package MyProject;

BEGIN{
    my $r = $::ENV{FLAP_ROOT} =~ /(.+)/ && $1 || '__FLAP_ROOT__';
    if($::INC{'Flap.pm'}){
        my $f = Flap->root_dir;
        die qq{Can't use diffirent FLAP_ROOT "$r" and "$f" in same process} if $r ne $f;
    }else{
        my $lib = "$r/lib";
        unshift @::INC, $lib if !grep{ $_ eq $lib } @::INC;
    }
}

use Flap qw/-b MyProject::Object -i Flap -m -r -s -w/;

1;
